@mixin carousel {
  .carousel-box {
    width: 80%;
    margin: 0 auto;

    .carousel-items {
      @include row-center;
      align-items: flex-end;
      margin: 50px auto;
      width: 90%;
      justify-content: space-around;

      .carousel-item {
        align-items: center;
        display: flex;
        flex-direction: column;
        cursor: pointer;

        span {
          font-size: 14px;
          @include text-inline;
        }

        img {
          width: 300px;
          margin: 10px 0;
          border-radius: 10px;
        }

        @media screen {
          img,
          span {
            @media (max-width: 1680px) {
              width: 230px;
            }

            @media (max-width: 1280px) {
              width: 150px;
            }

            @media (max-width: 720px) {
              width: 115px;
            }
          }
        }

      }
    }
  }
}

#videoBG {
  position: fixed;
  z-index: -1;
  top: -200px;
}

@media (min-aspect-ratio: 16/9) {
  #videoBG {
    width: 100%;
    height: auto;
  }
}

@media (max-aspect-ratio: 16/9) {
  #videoBG {
    width: auto;
    height: 100%;
  }
}

@media (max-width: 768px) {
  #videoBG {
    display: none;
  }

  body {
    background: url('../img/index.png');
    background-size: 1024px 768px;
    background-repeat: no-repeat;
  }
}

.index-container {
  width: 100%;

  .index-content {
    background-color: $background-color;
  }

  .index-title {
    transition: all 300ms ease 0s;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 12%;
    background: none;

    >img:nth-of-type(1) {
      margin: 25px;
      width: 35%;
    }

    >img:nth-of-type(2) {
      width: 43%;
      margin: 25px;
    }

    .diy-divider {
      width: 46%;
      height: 3px;
      background-color: darkred;
    }
  }

  .index-cate {
    background: $background-color;
    text-align: center;
    display: flex;
    flex-direction: column;

    img {
      margin: 30px auto;
    }

    span {
      font-size: $font-size;
      letter-spacing: 10px;
      text-indent: 10px;
    }

    @include carousel;
  }

  .index-des {
    >a {
      color: #2d8cf0 !important;
      font-size: 18px;
      visibility: hidden;
    }
  }

  .index-part1 {
    @include index-style1(row, start);

    &:hover a {
      visibility: visible;
    }
  }

  .index-part2 {
    @include index-style1(row-reverse, end);

    &:hover a {
      visibility: visible;
    }
  }

  .index-part3 {
    @include index-style2(row, start);

    &:hover a {
      visibility: visible;
    }

    .index-p3-plus {
      @include row-center;

      .p3-inner {
        @include column-center;
        margin: 0 20px;
      }
    }
  }

  .index-part4 {
    @include index-style2(row-reverse, end);

    &:hover a {
      visibility: visible;
    }
  }

  .index-part5 {
    background: $background-color;
    text-align: center;
    display: flex;
    flex-direction: column;

    img {
      margin: 30px auto;
    }

    span {
      font-size: $font-size;
      letter-spacing: 10px;
      text-indent: 10px;
      margin-bottom: 60px;
    }
  }

  .index-part6 {
    @include row-center;
    width: 100%;
    height: 30vh;
    background: url('../../assets/img/index_footer_bg.png');

    img {
      width: 15%;
    }
  }

  @include carousel;

  .person {
    margin: 0 auto !important;

    .carousel-item {
      border-radius: 10px;
      display: block;
      overflow: hidden;
      margin: 20px;

      img {
        margin: 0 !important;
        border-radius: 0 !important;
        transition: all .5s;
      }

      .craftsman-mark {
        @include text-inline;
        width: 300px;
        height: 130px;
        background-color: $background-color;
        position: absolute;
        bottom: -130px;
        transition: bottom 0.3s linear;
        overflow: hidden;
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;

        @media screen and (max-width: 1680px) {
          width: 230px;
        }

        @media screen and (max-width: 1280px) {
          width: 150px;
        }

        @media screen and (max-width: 720px) {
          width: 90px;
        }

        h3 {
          padding: 20px;
        }

        span {
          color: $sub-color;
          padding-left: 20px;
        }

      }

      &:hover {
        box-shadow: 0 4px 29px rgba($color: #000000, $alpha: .2);

        img {
          transform: scale(1.1);
        }

        .craftsman-mark {
          bottom: 0;
        }
      }

    }
  }
}
